import { defHttp } from '/@/utils/http/axios';
import { chinaUnionPayApiParams } from './model/chinaUnionPayListModel';
import { DownloadApiReq } from '/@/api/sys/model/download';

enum Api {
  GetchinaUnionPayList = '/chinaUnionPay/getChinaUnionOrderList',
  GetStatesList = '/chinaUnionPay/getStatus',
  Download = '/chinaUnionPay/exportExcel',
  ImportExcel = '/chinaUnionPay/importExcel',
  GetActivityStatesList = '/chinaUnionPay/getActivityStatus',
}

/**
 * @description: Get user menu based on id
 */

export const getchinaUnionPayList = (params: chinaUnionPayApiParams) => {
  return defHttp.post({ url: Api.GetchinaUnionPayList, params });
};

export const getStatesList = () => {
  return defHttp.get({ url: Api.GetStatesList });
};

export const exportExcel = (params: DownloadApiReq) => {
  return defHttp.post({ url: Api.Download, params });
};
export const importExcel = (params: FormData) => {
  return defHttp.post({
    headers: { 'Content-Type': 'multipart/form-data' },
    url: Api.ImportExcel,
    params,
  });
};

export const getActivityStatesList = () => {
  return defHttp.get({ url: Api.GetActivityStatesList });
};
